﻿
var speed : float = 0.1;

function Update () {
	if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) {
		var position : Vector2 = Input.GetTouch(0).deltaPosition;
		transform.Translate(0, position.y * speed, 0);
		Debug.Log(position.x);
	}
	//var moveO : Control = GameObject.Find("Cano").GetComponent("Control");
	//if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) {
		//var position : Vector2 = Input.GetTouch(0).deltaPosition;
		//if(position.y > 0){
		//	moveO.move(true);
		//}else if(position.y < 0){
		//	moveO.move(false);
		//}
	//}
}